package com.zzj.security.jwt.repository;

import com.zzj.security.jwt.entity.SysUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

/**
 * @ClassName SysUserRepository
 * @Description TODO
 * @Author zhijun zeng at 20:12 2020/5/17
 * @Version 1.0
 **/
public interface SysUserRepository extends JpaRepository<SysUser, Long> {

    @Query("select t from SysUser t where t.username = :username")
    SysUser findByUsername(@Param("username") String username);
}
